package com.jprocms.module.cms.es.dto;

import com.jpro.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author jprocms
 */
@Data
@Schema(description = "内容es后台查询dto")
public class ContentAdminQueryDto extends PageParam {
    //    @Schema(description = "内容标题")
//    private String title;
    @Schema(description = "搜索关键词匹配规则，1:匹配任意关键词 2：匹配所有关键词 3：所有关键词都不匹配 默认 1")
    private Integer qMatchType = 1;
    @Schema(description = "搜索关键词匹配项，1:标题匹配 2：内容文本匹配 3：标题匹配或者内容文本匹配 默认 3  4作者 5来源")
    private Integer qMathPos = 3;

    @Schema(description = "搜索关键词，前端查询参数")
    private String q;
    @Schema(description = "搜索关键词,es查询用")
    private List<String> keyWords;
    @Schema(description = "内容状态1:已发布;   2:流转中;   3:待发布;  4:退回;  5:下线  6:草稿;   7 删除    8彻底删除 9归档")
    private Integer status;
    @Schema(description = "内容查询排除状态")
    private Integer excludeStatus;
    @Schema(description = "标记属性")
    private Long dictMark;
    @Schema(description = "区块ID")
    private Long dictBlock;
    @Schema(description = "栏目id")
    private Long channelId;
    @Schema(description = "站点id")
    private Long siteId;
    @Schema(description = "是否逻辑删除")
    private Boolean isDelete;
    @Schema(description = "排序方式")
    private Integer sort;

    @Schema(description = "创建者")
    private String createUser;
    @Schema(description = "创建开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTimeStart;
    @Schema(description = "创建结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTimeEnd;
    @Schema(description = "发布开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date releaseTimeStart;
    @Schema(description = "发布结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date releaseTimeEnd;
    @Schema(description = "创建方式（1:直接创建    2:投稿  3:引用  4:复制")
    private Integer createMode;
    @Schema(description = "作者")
    private String author;
    @Schema(description = "来源")
    private String source;

    @Schema(description = "自定义字段查询")
    private Map<String, Object> customs;
}
